<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Title</title>

  <script src="jquery-3.5.1.js"></script>
  <script>
    $(function () {//保证这个html页面加载完成
      $("button").click(function () {
        alert("你点到我了");
        console.log(this);
        console.log(this.innerHTML);
      })
    });
  </script>
</head>
<body>
hello
<button id="mybuttonid1">
  按钮1
</button>
<button id="mybuttonid2">
  按钮2
</button>
</body>
</html>
</body>
</html>